From e8442a52aa6659a1aabd172ccbe00be9fdb09fdc Mon Sep 17 00:00:00 2001 From: Sven Herzberg Date: Fri, 15 Aug 2008 18:57:31 +0000 Subject: [PATCH] Use the g_test_*() API for this test reviewed by: Richard Hult 2008-08-15 Sven Herzberg Use the g_test_*() API for this test reviewed by: Richard Hult * gdk/tests/check-gdk-cairo.c: use the g_test_*() API to permit adding new tests svn path=/trunk/; revision=21133 --- ChangeLog | 8 ++++++++ gdk/tests/check-gdk-cairo.c | 20 ++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 550ec0a4a5..dc69953796 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-15 Sven Herzberg + + Use the g_test_*() API for this test + reviewed by: Richard Hult + + * gdk/tests/check-gdk-cairo.c: use the g_test_*() API to permit adding + new tests + 2008-08-15 Sven Herzberg Prepare for using the g_test_*() API diff --git a/gdk/tests/check-gdk-cairo.c b/gdk/tests/check-gdk-cairo.c index 5a0307b989..a89724e0c1 100644 --- a/gdk/tests/check-gdk-cairo.c +++ b/gdk/tests/check-gdk-cairo.c @@ -46,9 +46,8 @@ test (cairo_t* cr) cairo_stroke (cr); } -int -main (int argc, - char**argv) +static void +test_pixmap_orientation (void) { GdkPixmap* pixmap; GdkPixbuf* pixbuf; @@ -61,8 +60,6 @@ main (int argc, guchar* data_imagesrf; guint i; - gdk_init (&argc, &argv); - /* create "platform.png" via GdkPixmap */ pixmap = gdk_pixmap_new (NULL /* drawable */, 100 /* w */, 80 /* h */, 24 /* d */); cr = gdk_cairo_create (pixmap); @@ -133,7 +130,18 @@ main (int argc, g_unlink ("gdksurface.png"); g_unlink ("cairosurface.png"); +} + +int +main (int argc, + char**argv) +{ + g_test_init (&argc, &argv, NULL); + gdk_init (&argc, &argv); + + g_test_add_func ("/gdk/pixmap/orientation", + test_pixmap_orientation); - return 0; + return g_test_run (); } -- 2.30.2